Skip to content

Suppress update from consumer bridge if there is no change#89

Merged
zjswhhh merged 3 commits intosonic-net:masterfrom
yue-fred-gao:suppress_no_change_update
Aug 7, 2025
Merged

Suppress update from consumer bridge if there is no change#89
zjswhhh merged 3 commits intosonic-net:masterfrom
yue-fred-gao:suppress_no_change_update

Conversation

@yue-fred-gao
Copy link
Collaborator

@yue-fred-gao yue-fred-gao commented Jul 17, 2025

why

There is very frequent update from DPU_STATE. It appears pmon collecting dpu state and update this table every minute. But in each cycle, it makes multiple no change update to the table. redis doesn't seem to filter it. It sends notification regardlessly.

Also hamgrd sends no-change update to ProducerBridge or ZmqProducerBridge. The latter sends notification to DPU via zmq periodically propagated from DPU_STATE update. DashHaOrch treats no-change update as warning and it also pollutes swss.rec in DPU.

what this PR does

  • consumer bridge filters no change update. It compares the update to previous state. If there is no change, it will just drop the notification.
  • remove tracing span lifecycle events if logger is initialized from swss. span events are good for debugging long operations but they are also too chatty. They can be enabled if swbusd/hamgrd are started with RUST_LOG env, which has highest priority in initializing loggers.
  • producer bridge keeps a cache of previous update and filter out the no-change update.

@mssonicbld
Copy link

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@yue-fred-gao yue-fred-gao requested review from r12f and zjswhhh August 6, 2025 21:21
@mssonicbld
Copy link

Cherry-pick PR to msft-202506: Azure/sonic-dash-ha.msft#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants